import reqeust from "../index";

const LoginApi = {
  login: "/login",
  user: "/users/",
  menu: "/role/",
};

export function accoutLogin(accout) {
  return reqeust.post({
    url: LoginApi.login,
    data: accout,
  });
}

export function getUserInfo(id) {
  return reqeust.get({
    url: LoginApi.user + id,
  });
}

export function getMenuById(id) {
  return reqeust.get({
    url: LoginApi.menu + id + "/menu",
  });
}
